import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

class TitleSection extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.all(20),
      margin: EdgeInsets.only(bottom: 10),
      child: Row(
        children: <Widget>[
          // Expanded是一个弹性布局的组件，会自动占据多余的空间
          Expanded(
            child: Column(
              // mainAxisAlignment 代表主轴， crossAxisAlignment 代表副轴
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                Container(
                  margin: EdgeInsets.only(bottom: 6),
                  child: Text(
                    "Oeschinen Lake Campground",
                    style: TextStyle(fontWeight: FontWeight.w700),
                  ),
                ),
                Text(
                  "Kandersteg, Switzerland",
                  style: TextStyle(color: Colors.grey),
                ),
              ],
            ),
          ),
          Icon(Icons.star, color: Colors.red),
          Text("41")
        ],
      ),
    );
  }
}
